<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 500px;
            height: 500px;
        }
        .d1{
            background: linear-gradient(to right, rgb(47, 226, 47) 50% ,rgb(228, 217, 61) 50%);
            background-size: 40px 40px;
            background-position: 0 0, 20px 20px;
            position: relative;
            position: fixed;
            left: 0;
            top: 0;

        }
        .d2{
            background: linear-gradient(to bottom, rgb(228, 217, 61) 50%, rgb(47, 226, 47) 50%);
            background-size: 40px 40px;
            background-position: 0 0, 20px 20px;
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0.5;
        }

    </style>
</head>
<body>
    <div class="d1"></div>
    <div class="d2"></div>
</body>
</html>